<!DOCTYPE html>
<html lang="en">
<head>
	{% block head %}
		<meta charset="UTF-8">
		<link rel="icon" href="#">
		<title>
			{% block title %}
				WebChat
			{% endblock %}
		</title>
		<link href="/static/plugin/bootstrap-3.3.7-dist/css/bootstrap.min.css" type="text/css" rel="stylesheet">
		<link href="/static/css/base.css" type="text/css" rel="stylesheet">
		{% block head-ext %}
		{% endblock %}
	{% endblock %}
</head>
<body>
	<div class="bd-header">
		{% block bd-header %}
			<div class="bar">
				<div class="logo">
					{% block logo %}
						<label>欢迎来到WebChat</label>
					{% endblock %}
				</div>
				<div class="menu">
					{% block menu %}
						<ul>
							<li><a href="{% url 'chat_room' %}">聊天室</a></li>
						</ul>
					{% endblock %}
				</div>
				<div class="account">
					{% block account %}
						<ul>
{#							{% if request.user.is_authenticated %}#}
							{% if request.user.is_authenticated or is_login %}
								<li><a class="logout" href="{% url 'logout' %}">登出</a></li>
								<li>{{ request.user }}</li>
							{% else %}
								<li><a href="{% url 'register' %}">注册</a></li>
								<li><a href="{% url 'login' %}">登录</a></li>
							{% endif %}
						</ul>
					{% endblock %}
				</div>
			</div>
		{% endblock %}
	</div>

	<div class="bd-body bar">
		{% block bd-body %}
		{% endblock %}
	</div>

    <div class="bd-footer">
		{% block bd-footer %}
        	<p class="copyright">Copyright ©2017 ATPuper All Rights Reserved</p>
		{% endblock %}
    </div>

	{% block bd-js %}
		<script src="/static/plugin/jquery-1.11.3/jquery.min.js" type="text/javascript"></script>
		<script src="/static/plugin/bootstrap-3.3.7-dist/js/bootstrap.min.js" type="text/javascript"></script>
	{% endblock %}
</body>
</html>